package struct;

/**
 * 
 * @author Gabrielle DuBois
 */
public class Adult extends DBObject{
    private String first;
    private String last;
    private String dob;
    private String joined;
    private String occup;
    private String emp;
    private String wPhone;
    private String pPhone;
    private String email;
    private String notes;

    /**
     * Constructor
     * @param firstName
     * @param lastName
     * @param dateOfBirth
     * @param dateJoined
     * @param occupation
     * @param employer
     * @param workPhoneNumber
     * @param personalPhoneNumber
     * @param emailAddress
     * @param additionalNotes
     */
    public Adult(String firstName, String lastName, String dateOfBirth,
                    String dateJoined, String occupation, String employer,
                        String workPhoneNumber, String personalPhoneNumber,
                            String emailAddress, String additionalNotes){        
        super(10,3);
        attributes = new String[numAttributes];
        attributes[0] = first = firstName;
        attributes[1] = last = lastName;
        attributes[2] = dob = dateOfBirth;
        attributes[3] = joined = dateJoined;
        attributes[4] = occup = occupation;
        attributes[5] = emp = employer;
        attributes[6] = wPhone = workPhoneNumber;
        attributes[7] = pPhone = personalPhoneNumber;
        attributes[8] = email = emailAddress;
        attributes[9] = notes = additionalNotes;
        
    }//constructor

    /**
     * @see struct.DBObject
     * @return a String array wrapped as an Object array containing all the
     *          attributes that make up an adult in the following order:
     *          firstName, lastName, dateOfBirth, dateJoined, occupation,
     *          employer, workPhoneNumber, personalPhoneNumber, emailAddress,
     *          additionalNotes
     */
    public Object[] getAttributes(){
        return attributes;
    }

    /**
     *
     * @return a String containing...
     */
    public String getAdditionalNotes(){
        return notes;
    }

    /**
     *
     * @return a String containing...
     */
    public String getEmailAddress(){
        return email;
    }

    /**
     *
     * @return a String containing...
     */
    public String getPersonalPhoneNumber(){
        return pPhone;
    }

    /**
     *
     * @return a String containing...
     */
    public String getWorkPhoneNumber(){
        return wPhone;
    }

    /**
     *
     * @return a String containing...
     */
    public String getEmployer(){
        return emp;
    }

    /**
     *
     * @return a String containing...
     */
    public String getOccupation(){
        return occup;
    }

    /**
     *
     * @return a String containing...
     */
    public String getDateJoined(){
        return joined;
    }

    /**
     * 
     * @return a String containing the first name of the adult
     */
    public String getFirstName(){
        return first;
    }

    /**
     * 
     * @return a String containing the last name of the adult
     */
    public String getLastName(){
        return last;
    }

    /**
     * 
     * @return a String containing the birth date for the adult
     */
    public String getDateOfBirth(){
        return dob;
    }

    /**
     * @see struct.DBObject
     * @return A String array containing the familyName in position 0
     *          and primaryPhoneNumber in position 1
     */
    public String[] getKey(){
        String[] key = new String[numInPrimaryKey];
        key[0] = first;
        key[1] = last;
        key[2] = dob;

        return key;
    }//getKey()
}//Adult
